package com.imooc.o2o.util;

import java.util.Locale;

/**
 * @author yangshucheng
 * @create 2021-04-06 17:02
 */
public class PathUtil {
    private static final String separator = System.getProperty("file.separator");

    public static String getImgBasePath(){
        String os = System.getProperty("os.name");
        String basePath = "";
        if (os.toLowerCase().startsWith("win")) {
            basePath = "E:\\迅雷下载\\upload\\upload\\images";
        }else {
            basePath = "/home/ysc/image";
        }
        basePath = basePath.replace("/",separator);
        return basePath;
    }

    public static String getShopImagePath(long shopId){
        String imagePath = "/upload/images/item/shop/" + shopId + "/";
        return imagePath.replace("/",separator);
    }
    public static String getHeadLineImagePath() {
        String imagePath = "/upload/images/item/headtitle/";
        return imagePath.replace("/", separator);
    }
    public static String getShopCategoryPath() {
        String imagePath = "/upload/images/item/shopcategory/";
        return imagePath.replace("/", separator);
    }
}
